<script>
	import {
		getUserInfo
	} from "@/services/base.js"
	export default {
		onLaunch: async function() {
			console.log('App Launch')
			const token = uni.getStorageSync('token')
			const userConfig = uni.getStorageSync('userConfig')
			if (!!token) {
				// 用户已经登录过小程序
				const userInfo = await getUserInfo()
				console.log(userInfo, '1234')
				// uni.setStorageSync('userConfig', {...userConfig, ...userInfo.data})
			} else {
				// 跳转到手机一键登录界面
				uni.reLaunch({
					url: '/pages/login/phoneLogin'
				})
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/* 每个页面公共css */
</style>